﻿<UserControl x:Class="Wen.UI.NavigationControls.XyzControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <Grid>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="Auto" />
      <ColumnDefinition Width="Auto" />
    </Grid.ColumnDefinitions>
    <Grid Grid.Column="0">
      <Border Style="{StaticResource JoypadBorderStyle}">
        <UniformGrid>
          <RepeatButton Style="{StaticResource JoypadButtonStyle}" Command="{Binding YMinusCommand}">
            <RepeatButton.LayoutTransform>
              <ScaleTransform ScaleX="-1" />
            </RepeatButton.LayoutTransform>
          </RepeatButton>
          <RepeatButton Style="{StaticResource JoypadButtonStyle}" Command="{Binding XPlusCommand}" />
          <RepeatButton Style="{StaticResource JoypadButtonStyle}" Command="{Binding XMinusCommand}">
            <RepeatButton.LayoutTransform>
              <ScaleTransform ScaleX="-1" ScaleY="-1" />
            </RepeatButton.LayoutTransform>
          </RepeatButton>
          <RepeatButton Style="{StaticResource JoypadButtonStyle}" Command="{Binding YPlusCommand}">
            <RepeatButton.LayoutTransform>
              <ScaleTransform ScaleY="-1" />
            </RepeatButton.LayoutTransform>
          </RepeatButton>
        </UniformGrid>
      </Border>
      <RepeatButton Style="{StaticResource JoypadButtonStyle}" Command="{Binding ZMinusCommand}" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="6">
        <RepeatButton.LayoutTransform>
          <ScaleTransform ScaleX="-1" ScaleY="-1" />
        </RepeatButton.LayoutTransform>
      </RepeatButton>
      <RepeatButton Style="{StaticResource JoypadButtonStyle}" Command="{Binding ZPlusCommand}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="6" />
    </Grid>
    <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left">
      <StackPanel Orientation="Horizontal">
        <UniformGrid Columns="1" HorizontalAlignment="Left">
        </UniformGrid>
        <Button DockPanel.Dock="Bottom"  ToolTip="Reset" Command="{Binding ResetCommand}" Style="{StaticResource ResetButtonStyle}" />
      </StackPanel>
      <TextBox Text="{Binding Coords, Mode=OneWay}" FontSize="11" Margin="5" Width="80" IsReadOnly="True" />
    </StackPanel>
  </Grid>
</UserControl>
